<% content_for :body do %>
  <% if request_frame == "root" %>
    <div
      id="app"
      x-data="app"
      x-cloak
      x-on:popstate.window="handleNavigation"
      x-on:click.document="hijax"
      class="overflow-hidden">
      
      <%= render "lookbook/partials/user_styles" %>

      <div id="app-main" class="contents">
        <%= content_for?(:main) ? yield(:main) : yield %>
      </div>
    </div>

    <% if content_for? :dropdowns %>
      <div class="hidden">
        <%= content_for :dropdowns -%>
      </div>
    <% end %>
  <% elsif request_frame == "main" %>
    <div id="app-main">
      <%= content_for?(:main) ? yield(:main) : yield %>
    </div>    
  <% end %>    
<% end %>

<% if frame_request? %>
  <%= yield :body %>
<% else %>
  <%= render template: "layouts/lookbook/skeleton" %>
<% end %>
